import { createStateContext } from 'react-use';

type State = {
  activeId?: string | number;
  activeIds: Array<string | number>;
  prevId?: string | number;
  inTransition?: boolean;
  duration?: number;
  exclusive?: boolean;
};

const [useAccordionContext, AccordionContextProvider] = createStateContext<State>({
  activeIds: [],
});

export { useAccordionContext, AccordionContextProvider };
